<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <title>PresentationML Support Module Functions </title>
     <meta name="Homepage" content="server, administration, Mark Logic, xml, xquery, database">
     <meta name="Keywords" content="server, administration, Mark Logic, xml, xquery, database">
     <meta name="Description" content="PresentationML Support Module Functions">
     <link href="images/admin.css" type="text/css" rel="stylesheet">
     <link href="images/img.css" type="text/css" rel="stylesheet">
     <script type="text/javascript" language="javascript" src="images/tree.js"></script>
   </head>
   <div FirebugVersion="1.3.3" style="display: none;" id="_firebugConsole"></div>
   <body>
     <form name="apidocs" action="apidocs.xqy" method="get">
       <input name="fname" value="PresentationML" type="hidden">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" height="400">
	 <tbody>
           <tr>
	     <td class="mainbody" valign="top">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
               <tbody>
                 <tr style="background-color: rgb(160, 0, 46);" valign="top">
		   <td width="100%" align="left" height="90">
                     <div><img src="images/varspace.gif" alt="" width="178" height="1"></div>
                     <div class="host-details" style="padding-left: 20px; padding-top: 10px;">
                       <div>This page was generated</div>
                       <div>Jan.&nbsp;25,&nbsp;2010</div>
                       <div>11:01&nbsp;PM</div>
                     </div>
                   </td>
		   <td style="background-image: url(images/top-right-right-background.gif); background-repeat: no-repeat;" valign="bottom" width="420" align="left">
                     <div><img src="images/varspace.gif" alt="" width="420" height="1"></div>
                     <div class="page-name" style="text-align: right; padding-right: 8px; padding-bottom: 2px;">XQuery Function Reference</div>
                   </td>
	         </tr>
                 <tr valign="top">
		   <td colspan="3" width="100%" align="left" height="100%">
                    <div><img src="images/varspace.gif" alt="" width="598" height="1"></div>
                    <table width="100%" align="center" cellpadding="4" cellspacing="1">
                      <tbody><tr valign="top">
		        <td>
                          <table width="100%">
			  <tbody>
                            <tr align="center">
			     <td><br>
                              <font size="+1"><b>
                               Module: PresentationML Support
                               </b><br></font>
                               <br>
                             </td>
			    </tr>
                            <tr>
			     <td style="font-family: arial; font-size: 10pt;">
                               <p>The PresentationML function module is installed as the following file:</p>
                               <ul>
			         <li><code><em>install_dir</em>/Modules/MarkLogic/openxml/presentation-ml-support.xqy</code></li>
			       </ul>
                               <p>where <code><em>install_dir</em></code> is the directory in which MarkLogic Server is installed.</p>
                               <p>To use the <code>presentation-ml-support.xqy</code> module in your own XQuery modules, 
                                  include the following line in your XQuery prolog:</p>
                               <p><code>import module namespace ppt="http://marklogic.com/openxml/powerpoint" 
		                         at "/MarkLogic/MarkLogic/openxml/presentation-ml-support.xqy"</code></p>
                               <p>The PresentationML functions are used to manipulate Microsoft Office
                                  Open XML documents.</p>
                               <table class="table-line" width="100%" align="center" bgcolor="#000000" cellpadding="4" cellspacing="1">
				<tbody>
                                  <tr bgcolor="#f2ebce">
			            <td colspan="10">
                                      <font size="+1"><b>Function Summary</b></font>
                                    </td>
				  </tr>
                                  <tr class="mainbody">
			            <td style="font-family: arial; font-size: 10pt;">
                                       <a href="#ppt:directory-uris"><b>ppt:directory-uris</b></a> 
                                    </td>
			            <td style="font-family: arial; font-size: 10pt;">
                                       This function returns URIs for the presentation documents within the specified directory.
                                    </td>
				  </tr>
                                  <tr class="mainbody">
			            <td style="font-family: arial; font-size: 10pt;">
                                       <a href="#ppt:insert-slide"><b>ppt:insert-slide</b></a> 
                                    </td>
			            <td style="font-family: arial; font-size: 10pt;">
                                       This function returns updated map for the presentation, with slides inserted from presentations specified in parameters.
                                    </td>
				  </tr>
                                  <tr class="mainbody">
			            <td style="font-family: arial; font-size: 10pt;">
                                       <a href="#ppt:package-make"><b>ppt:package-make</b></a> 
                                    </td>
			            <td style="font-family: arial; font-size: 10pt;">
                                       This function returns a presentation in the OPC (Open Packaging Convention) format XML. 
                                    </td>
			          </tr>
                                  <tr class="mainbody">
			            <td style="font-family: arial; font-size: 10pt;">
                                       <a href="#ppt:package-map"><b>ppt:package-map</b></a> 
                                    </td>
			            <td style="font-family: arial; font-size: 10pt;">
                                       This function returns a map for the specified presentation.
                                    </td>
			          </tr>
                                  <tr class="mainbody">
			            <td style="font-family: arial; font-size: 10pt;">
                                       <a href="#ppt:package-map-zip"><b>ppt:package-map-zip</b></a> 
                                    </td>
			            <td style="font-family: arial; font-size: 10pt;">
                                       This function returns the zip archive for the documents specified in the map. 
                                    </td>
				  </tr>
			          <!--
                                  <tr class="mainbody">
			            <td style="font-family: arial; font-size: 10pt;">
                                      <a href="#ppt:uri-app-props"><b>
            ppt:uri-app-props
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
	  This function returns URI for docProps/app.xml presentation package part. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-content-types"><b>
            ppt:uri-content-types 
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for [Content_Types].xml presentation package part. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-core-props"><b>
           ppt:uri-core-props
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for docProps/core.xml presentation package part. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-docprops-dir"><b>
           ppt:uri-docprops-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for docProps/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-dir"><b>
            ppt:uri-ppt-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/ presentation package part. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-handout-master"><b>
            ppt:uri-ppt-handout-master
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/handoutMasters/handoutMaster#.xml presentation pacakage part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-handout-master-rels"><b>
            ppt:uri-ppt-handout-master-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
	  This function returns URI for ppt/handoutMasters/_rels/handoutMaster#.xml.rels presentation package part.
	  </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-handout-master-rels-dir"><b>
            ppt:uri-ppt-handout-master-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/handoutMasters/_rels/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-handout-masters-dir"><b>
            ppt:uri-ppt-handout-masters-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/handoutMasters/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-media-dir"><b>
            ppt:uri-ppt-media-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/media/ presentation pacakge part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-notes-master"><b>
            ppt:uri-ppt-notes-master
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
            This function returns URI for ppt/notesMasters/notesMaster#.xml presentation package part.
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-notes-master-rels"><b>
            ppt:uri-ppt-notes-master-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
           This function returns URI for ppt/notesMasters/_rels/ presentation package part. 
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-notes-masters-dir"><b>
            ppt:uri-ppt-notes-masters-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
            This function returns URI for ppt/notesMasters/ presentation package part.
</td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-notes-masters-rels-dir"><b>
           ppt:uri-ppt-notes-masters-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/notesMasters/_rels/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-presentation"><b>
           ppt:uri-ppt-presentation
           </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/presentation.xml presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-pres-props"><b>
           ppt:uri-ppt-pres-props 
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/presProps.xml presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-rels"><b>
            ppt:uri-ppt-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/_rels/presentation.xml.rels presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide"><b>
            ppt:uri-ppt-slide
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slides/slide#.xml presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-layout"><b>
            ppt:uri-ppt-slide-layout
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideLayouts/slideLayout#.xml presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-layout-rels"><b>
            ppt:uri-ppt-slide-layout-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideLayouts/_rels/slideLayout#.xml.rels presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-layout-rels-dir"><b>
            ppt:uri-ppt-slide-layout-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideLayouts/_rels/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-layouts-dir"><b>
            ppt:uri-ppt-slide-layouts-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideLayouts/ presentation package part.
          </td>
			  </tr>










<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-master"><b>
            ppt:uri-ppt-slide-master
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideMasters/slideMaster#.xml presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-master-rels"><b>
            ppt:uri-ppt-slide-master-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideMasters/_rels/slideMaster#.xml.rels presentation package part.
          </td>
			  </tr><tr class="mainbody"$src-dir as xs:string*>
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-master-rels-dir"><b>
            ppt:uri-ppt-slide-master-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideMasters/_rels/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-masters-dir"><b>
            ppt:uri-ppt-slide-masters-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slideMasters/ presentation package part.
          </td>
			  </tr>
<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-rels"><b>
            ppt:uri-ppt-slide-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slides/_rels/slide#.xml.rels presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slide-rels-dir"><b>
            ppt:uri-ppt-slide-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slides/_rels/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-slides-dir"><b>
            ppt:uri-ppt-slides-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/slides/ presentation package part.
          </td>
			  </tr>

<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-table-styles"><b>
            ppt:uri-ppt-table-styles
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/tableStyles.xml presentation package part.
          </td>
			  </tr>
<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-theme"><b>
            ppt:uri-ppt-theme
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/theme/theme#.xml presentation package part.
          </td>
			  </tr<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-theme-dir"><b>
            ppt:uri-ppt-theme-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/theme/ presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-theme-rels"><b>
            ppt:uri-ppt-theme-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/theme/_rels/theme#.xml.rels presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-theme-rels-dir"><b>
            ppt:uri-ppt-theme-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/theme/_rels/ presentation package part.
          </td>
			  </tr>
<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-ppt-view-props"><b>
            ppt:uri-ppt-view-props
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for ppt/viewProps.xml presentation package part.
          </td>
			  </tr><tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-rels"><b>
            ppt:uri-rels
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for  _rels/.rels presentation package part.
          </td>
			  </tr>
<tr class="mainbody">
			    <td style="font-family: arial; font-size: 10pt;">
          <a href="#ppt:uri-rels-dir"><b>
            ppt:uri-rels-dir
            </b></a> 
          </td>
			    <td style="font-family: arial; font-size: 10pt;">
          This function returns URI for _rels/ presentation package part.
          </td>
			  </tr>-->
                                </tbody>
                              </table>
                             </td>
			    </tr>
                            <tr>
		             <td><img src="images/varspace.gif" height="10"></td>
		            </tr>
                            <tr>
		             <td>
                              <table class="table-line" width="100%" align="right" bgcolor="#000000" cellpadding="4" cellspacing="1">
                               <tbody>
                                 <tr bgcolor="#f2ebce">
			          <td colspan="10">
                                    <font size="+1"><b>Function Detail</b></font>
                                  </td>
			         </tr>
                                 <tr class="mainbody">
				  <td>
 <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">
				   <tbody>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12">
				      <!--<hr class="control-line" size="1">-->
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td>
                                      <table>
                                       <tbody>
                                        <tr>
					 <td colspan="2" style="font-size: 12pt; font-family: Courier;">
                                          <a id="ppt:directory-uris"></a><b><font color="#c00831">ppt:directory-uris</font></b>(
                                         </td>
				        </tr>
                                        <tr>
					 <td width="20"></td>
					 <td style="font-size: 11pt; font-family: Courier;">$directory as xs:string
                                         </td>
				        </tr>
                                        <tr>
					 <td width="20"></td>
					 <td style="font-size: 11pt; font-family: Courier;">[$depth as xs:string]
                                         </td>
				        </tr>
                                        <tr>
					 <td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp;as&nbsp;xs:string*</td>
				        </tr>
                                       </tbody>
                                      </table>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12"></td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Summary:</b>
                                      <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
                                         This function returns URIs for the presentation documents within the specified directory.
                                      </div><br>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Parameters:</b>
                                      <table>
                                       <tbody>
                                        <tr class="mainbody">
					 <td style="font-size: 11pt; font-family: Arial;">
                                          <img src="images/varspace.gif" width="8">
                                          <div style="margin-left: 0.5in; margin-right: 8px;">
                                           <font style="font-size: 11pt; font-family: Courier;">$directory:
                                           </font>
                                           <font style="font-family: arial; font-size: 10pt;">
                The directory in MarkLogic that includes the document parts for an extracted presentation. 
                                           </font>
                                          </div> 
                                         </td>
				        </tr>
                                        <tr class="mainbody">
					 <td style="font-size: 11pt; font-family: Arial;">
                                          <img src="images/varspace.gif" width="8">
                                          <div style="margin-left: 0.5in; margin-right: 8px;">
                                          <font style="font-size: 11pt; font-family: Courier;">$depth
                                          </font>
                                          <font style="font-family: arial; font-size: 10pt;">
                (optional):  The depth of the directory query. Default is "infinity". 
                                          </font>
                                         </div> 
                                        </td>
				       </tr>
                                      </tbody>
                                     </table>
                                     <br>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td>
                                     <img src="images/varspace.gif" width="8">
                                     <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
                                     <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
                                      <pre xml:space="preserve">
xquery version "1.0-ml";
import module namespace ppt=  "http://marklogic.com/openxml/powerpoint" at "/MarkLogic/openxml/presentation-ml-support.xqy";

let $presentation-dir:="/foo_pptx_parts/"   
return ppt:directory-uris($presentation-dir)

=&gt;
/foo_pptx_parts/[Content_Types].xml
/foo_pptx_parts/_rels/.rels
/foo_pptx_parts/docProps/app.xml
/foo_pptx_parts/docProps/core.xml
/foo_pptx_parts/docProps/thumbnail.jpeg
/foo_pptx_parts/ppt/_rels/presentation.xml.rels
/foo_pptx_parts/ppt/media/image1.png
/foo_pptx_parts/ppt/presProps.xml
/foo_pptx_parts/ppt/presentation.xml
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout1.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout10.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout11.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout2.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout3.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout4.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout5.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout6.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout7.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout8.xml.rels
/foo_pptx_parts/ppt/slideLayouts/_rels/slideLayout9.xml.rels
/foo_pptx_parts/ppt/slideLayouts/slideLayout1.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout10.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout11.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout2.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout3.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout4.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout5.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout6.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout7.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout8.xml
/foo_pptx_parts/ppt/slideLayouts/slideLayout9.xml
/foo_pptx_parts/ppt/slideMasters/_rels/slideMaster1.xml.rels
/foo_pptx_parts/ppt/slideMasters/slideMaster1.xml
/foo_pptx_parts/ppt/slides/_rels/slide1.xml.rels
/foo_pptx_parts/ppt/slides/slide1.xml
/foo_pptx_parts/ppt/tableStyles.xml
/foo_pptx_parts/ppt/theme/theme1.xml
/foo_pptx_parts/ppt/viewProps.xml
                                      </pre>
                                     </div>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td></td>
				   </tr>
	                          </tbody>
				 </table>


                                   <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tbody>
                                     <tr class="mainbody">
				      <td>
					<img src="images/varspace.gif" height="12">
                                        <hr class="control-line" size="1">
                                      </td>
				     </tr>
                                     <tr class="mainbody">
				      <td>
                                       <table>
	                                <tbody>
                                         <tr>
					  <td colspan="2" style="font-size: 12pt; font-family: Courier;">
                                           <a id="ppt:insert-slide"></a><b><font color="#c00831">ppt:insert-slide</font></b>(
                                          </td>
				         </tr>
                                         <tr>
					  <td width="20"></td>
					  <td style="font-size: 11pt; font-family: Courier;">$map as map:map
                                          </td>
				         </tr>
                                         <tr>
					  <td width="20"></td>
					  <td style="font-size: 11pt; font-family: Courier;">$from-pres as xs:string+
                                          </td>
				         </tr>
                                         <tr>
					  <td width="20"></td>
					  <td style="font-size: 11pt; font-family: Courier;">$from-idx as xs:integer+
                                          </td>
				         </tr>
                                         <tr>
					  <td width="20"></td>
					  <td style="font-size: 11pt; font-family: Courier;">$insert-idx as xs:integer
                                          </td>
				         </tr>
                                         <tr>
					  <td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp;as&nbsp;map:map</td>
				         </tr>
                                        </tbody>
                                       </table>
                                      </td>
				     </tr>
                                     <tr class="mainbody">
				      <td><img src="images/varspace.gif" height="12"></td>
				     </tr>
                                     <tr class="mainbody">
				      <td style="font-size: 10pt; font-family: Arial;">
                                        <img src="images/varspace.gif" width="8">
                                        <b>Summary:</b>
                                        <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
					  This function returns updated map for the presentation, with slides inserted from 
                                          presentations specified in parameters.
					<br/><br/>

  The keys for the map are the names for the files within a presentation .pptx package.  The value for the key is either<br/>
 A) a URI for a presentation part in MarkLogic, or B) the actual XML element for the respective presentation package part.
                                        <br/><br/>
<i>Note: the lengths of the sequences of $from-pres and $from-idx must be equal, otherwise an Error is thrown. </i><br/><br/>
<i>Note: a slide may be inserted into the presentation contained within $map at any slide index that is <br/>
within the count of slides contained within the presentation +1.  Trying to insert a slide into an index that is not allowed results in Error.</i>
                                        </div><br>
                                       </td>
				      </tr>
                                      <tr class="mainbody">
				       <td style="font-size: 10pt; font-family: Arial;">
                                        <img src="images/varspace.gif" width="8">
                                        <b>Parameters:</b>
                                        <table>
                                         <tbody>
                                          <tr class="mainbody">
		                           <td style="font-size: 11pt; font-family: Arial;">
                                            <img src="images/varspace.gif" width="8">
                                            <div style="margin-left: 0.5in; margin-right: 8px;">
                                             <font style="font-size: 11pt; font-family: Courier;">
                                              $map:
                                             </font>
                                             <font style="font-family: arial; font-size: 10pt;">
                                              The map for a .pptx presentation.
                                             </font>
                                            </div> 
                                           </td>
				          </tr>
                                          <tr class="mainbody">
		                           <td style="font-size: 11pt; font-family: Arial;">
                                            <img src="images/varspace.gif" width="8">
                                            <div style="margin-left: 0.5in; margin-right: 8px;">
                                             <font style="font-size: 11pt; font-family: Courier;">
                                              $from-pres:
                                             </font>
                                             <font style="font-family: arial; font-size: 10pt;">
                The directory in MarkLogic for a presentation from which slides will be inserted into the presentation within $map.
                                             </font>
                                            </div> 
                                           </td>
				          </tr>
                                         <tr class="mainbody">
		                          <td style="font-size: 11pt; font-family: Arial;">
                                           <img src="images/varspace.gif" width="8">
                                           <div style="margin-left: 0.5in; margin-right: 8px;">
                                            <font style="font-size: 11pt; font-family: Courier;">
                                             $from-idx:
                                            </font>
                                            <font style="font-family: arial; font-size: 10pt;">
                 The index of the slide within the $from-pres that is to be inserted into $map.
                                            </font>
                                           </div> 
                                          </td>
				         </tr>
                                         <tr class="mainbody">
		                          <td style="font-size: 11pt; font-family: Arial;">
                                           <img src="images/varspace.gif" width="8">
                                           <div style="margin-left: 0.5in; margin-right: 8px;">
                                           <font style="font-size: 11pt; font-family: Courier;">
                                            $insert-idx:
                                           </font>
                                           <font style="font-family: arial; font-size: 10pt;">
                The insertion point for the presentation within $map, where the slide inserted from $from-pres will be inserted at.
                                           </font>
                                          </div> 
                                         </td>
				        </tr>
                                       </tbody>
                                      </table><br>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td>
                                      <img src="images/varspace.gif" width="8">
				      <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font><br/><br/>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;">
<font style="font-family: arial; font-size: 10pt;">In the following example, we have 2 presentations we've saved: demo_one.pptx and demo_two.pptx.  These have both been unzipped and<br/> their respectve parts saved to MarkLogic using the Office OpenXML Extract pipeline.  Opening the presentations (.pptx) in PowerPoint, the<br/> slides appear as follows:</font><br/><br/>
</div>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;">
<table style="border-width:15px;">
<tr><td>demo_one.pptx</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>demo_two.pptx</td><tr>
<tr>
<td style="padding:5px; border-width:1px; border-style:solid; border-color:gray;"><img src="images/demo_one/Slide1.PNG" class="resize"></img></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td style="padding:5px; border-width:1px; border-style:solid; border-color:gray;"><img src="images/demo_two/Slide1.PNG" class="resize"></img></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr>
<td style="padding:5px; border-width:1px; border-style:solid; border-color:gray;"><img src="images/demo_one/Slide2.PNG" class="resize"></img></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td></td>
</tr>
<tr>
</tr>
</table>
</div>


<br/><br/>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;">
<font style="font-family: arial; font-size: 10pt;">demo_one.pptx has 2 slides, and demo_two.pptx has 1.  We can insert slide 1 of demo_two.pptx to position 2 of presentation demo_one.pptx from<br/>the extracted parts to create demo_three.pptx as follows:</font>
</div>

                    
                                      <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
				       <pre xml:space="preserve">
xquery version "1.0-ml";

import module namespace ppt=  "http://marklogic.com/openxml/powerpoint" at "/MarkLogic/openxml/presentation-ml-support.xqy";

let $target-pres:="/demo_one_pptx_parts/"       (:target presentation:)
let $source-pres:="/demo_two_pptx_parts/"       (:source presentation:)

let $source-idx := 1    (:index of slide in source to copy to target :)
let $start-idx :=  2    (:insertion index of target presentation     :)

let $pptx-map := ppt:package-map($target-pres)

let $new-map  := ppt:insert-slide($pptx-map,$source-pres, $source-idx, $start-idx)
let $pptx-pkg := ppt:package-map-zip($new-map)  

return xdmp:save("C:\demo_three.pptx",$pptx-pkg)
</pre></div><br/>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;">
<font style="font-family: arial; font-size: 10pt;">The resulting presentation, when opened in PowerPoint will be:</font><br/><br/>
</div>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;">
<table style="border-width:15px;">
<tr><td>demo_three.pptx</td></tr>
<tr><td style="padding:5px; border-width:1px; border-style:solid; border-color:gray;"><img src="images/demo_three/Slide1.PNG" class="resize"></img></td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td style="padding:5px; border-width:1px; border-style:solid; border-color:gray;"><img src="images/demo_three/Slide2.PNG" class="resize"></img></td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td style="padding:5px; border-width:1px; border-style:solid; border-color:gray;"><img src="images/demo_three/Slide3.PNG" class="resize"></img></td></tr>
</table>
<br/><br/>
</td></tr>
<tr class="mainbody">


<td>
                                      <img src="images/varspace.gif" width="8">
				      <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"><br/>
<font style="font-family: arial; font-size: 10pt;">We can insert slides from multiple source presentations into a single destination presentation as well.</font><br/>
</div>
<div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
 <pre xml:space="preserve">
xquery version "1.0-ml";
import module namespace ppt=  "http://marklogic.com/openxml/powerpoint" at "/MarkLogic/openxml/presentation-ml-support.xqy";

let $targ-pres:="/one_pptx_parts/"          (:target presentation:)
let $source-pres-one:= "/two_pptx_parts/"   (:source presentation:)
let $source-pres-two:= "/three_pptx_parts/" (:another source presentation:) 
let $s-idx-1 := 1                           (: index of slide in source-pres-one to copy to target   :)
let $s-idx-2 := 15                          (: index of slide in source-pres-two to copy to target   :)
let $start-idx := 2                         (: insertion index starting point of target presentation :)

let $pptx-map := ppt:package-map($targ-pres)

return ppt:insert-slide($pptx-map, ($source-pres-one,$source-pres-two), ($s-idx-1,$s-idx-2), $start-idx)

=&gt;

Returns a map containing the presentation contained within /one_pptx_parts/,
updated to include slide 1 from /two_pptx_parts/ and slide 15 from /three_pptx_parts/ as slides 2 and 3 respectively.

Assuming the presentation within /one_pptx_parts/ started with 3 slides, it now has 5 total, 
and its original slides 2 and 3 have been shifted to 4 and 5 respectively.
</pre></div>
<div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;">
<font style="font-family: arial; font-size: 10pt;">
For each slide mapped within the map, images will be retained and references throughout the package will be updated.<br/> 
Slides will use the master and layout of the presentation within the map.  Slides inserted will retain the target presentation look and feel. 
<br/><br/>
<i>Note: While this function works great for a certain class of Slides, and retains images, animations, and much more for a Slide when inserting<br/> from the original source into the target presentation, this function currently does not support Smart Art, Diagrams, Embeddings (.xlsx), or<br/> the ability to insert a Slide into a target presentation while maintaining the slideMaster and slideLayout from the original source presentation.<br/>  Also, while Notes are available in the target presentation, notes will not be retained for slides inserted from the source presentations.</i> <br/><br/>
</font>
<div>

 
                                       
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td></td>
				    </tr>
                                   </tbody>
                                  </table>
                                  <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">
				   <tbody>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12">
                                      <hr class="control-line" size="1">
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td>
                                      <table>
                                       <tbody>
                                        <tr>
					 <td colspan="2" style="font-size: 12pt; font-family: Courier;">
                                          <a id="ppt:package-make"></a><b><font color="#c00831">ppt:package-make</font></b>(
                                         </td>
				        </tr>
                                        <tr>
					 <td width="20"></td>
					 <td style="font-size: 11pt; font-family: Courier;">$directory as xs:string
                                         </td>
				        </tr>
                                        <tr>
					 <td width="20"></td>
					 <td style="font-size: 11pt; font-family: Courier;">$uris as xs:string*
                                         </td>
				        </tr>
                                        <tr>
					 <td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp;as&nbsp;element(pkg:package)</td>
				        </tr>
                                       </tbody>
                                      </table>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12"></td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Summary:</b>
                                      <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns a presentation in the OPC (Open Packaging Convention) format XML.
                                      </div><br>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Parameters:</b>
                                      <table>
                                       <tbody>
                                        <tr class="mainbody">
					 <td style="font-size: 11pt; font-family: Arial;">
                                          <img src="images/varspace.gif" width="8">
                                          <div style="margin-left: 0.5in; margin-right: 8px;">
                                           <font style="font-size: 11pt; font-family: Courier;">$directory:
                                           </font>
                                           <font style="font-family: arial; font-size: 10pt;">
                The directory in MarkLogic that includes the files for an extracted presentation. 
                                           </font>
                                          </div> 
                                         </td>
				        </tr>
                                        <tr class="mainbody">
					 <td style="font-size: 11pt; font-family: Arial;">
                                          <img src="images/varspace.gif" width="8">
                                          <div style="margin-left: 0.5in; margin-right: 8px;">
                                          <font style="font-size: 11pt; font-family: Courier;">$uris:
                                          </font>
                                          <font style="font-family: arial; font-size: 10pt;">
                The uris for the files within the $directory to use to as the pkg:parts of the OPC package. 
                                          </font>
                                         </div> 
                                        </td>
				       </tr>
                                      </tbody>
                                     </table>
                                     <br>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td>
                                     <img src="images/varspace.gif" width="8">
                                     <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
                                     <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
				      <pre xml:space="preserve">
xquery version "1.0-ml";
import module namespace ppt=  "http://marklogic.com/openxml/powerpoint" at "/MarkLogic/openxml/presentation-ml-support.xqy";

let $presentation-dir:="/foo_pptx_parts/" 
let $uris := ppt:directory-uris($presentation-dir) 
return ppt:package-make($presentation-dir, $uris)
=&gt;
&lt;pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"&gt;
  &lt;pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"&gt;
    &lt;pkg:xmlData&gt;
      &lt;Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"&gt;
        &lt;Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/&gt;
        &lt;Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail" Target="docProps/thumbnail.jpeg"/&gt;
        &lt;Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="ppt/presentation.xml"/&gt;
        &lt;Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/&gt;
      &lt;/Relationships&gt;
    &lt;/pkg:xmlData&gt;
  &lt;/pkg:part&gt;
  &lt;pkg:part pkg:name="/docProps/app.xml" pkg:contentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"&gt;
    &lt;pkg:xmlData&gt;
      &lt;Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" 
                     xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"&gt;
        &lt;TotalTime&gt;0&lt;/TotalTime&gt;
        &lt;Words&gt;4&lt;/Words&gt;
        &lt;Application&gt;Microsoft Office PowerPoint&lt;/Application&gt;
        &lt;PresentationFormat&gt;On-screen Show (4:3)&lt;/PresentationFormat&gt;
        &lt;Paragraphs&gt;1&lt;/Paragraphs&gt;
        &lt;Slides&gt;1&lt;/Slides&gt;
        &lt;Notes&gt;0&lt;/Notes&gt;
        &lt;HiddenSlides&gt;0&lt;/HiddenSlides&gt;
        &lt;MMClips&gt;0&lt;/MMClips&gt;
        &lt;ScaleCrop&gt;false&lt;/ScaleCrop&gt;
        &lt;HeadingPairs&gt;
          &lt;vt:vector size="4" baseType="variant"&gt;
            &lt;vt:variant&gt;
              &lt;vt:lpstr&gt;Theme&lt;/vt:lpstr&gt;
            &lt;/vt:variant&gt;
            &lt;vt:variant&gt;
              &lt;vt:i4&gt;1&lt;/vt:i4&gt;
            &lt;/vt:variant&gt;
            &lt;vt:variant&gt;
              &lt;vt:lpstr&gt;Slide Titles&lt;/vt:lpstr&gt;
            &lt;/vt:variant&gt;
            &lt;vt:variant&gt;
              &lt;vt:i4&gt;1&lt;/vt:i4&gt;
            &lt;/vt:variant&gt;
          &lt;/vt:vector&gt;
        &lt;/HeadingPairs&gt;
        &lt;TitlesOfParts&gt;
          &lt;vt:vector size="2" baseType="lpstr"&gt;
            &lt;vt:lpstr&gt;Office Theme&lt;/vt:lpstr&gt;
            &lt;vt:lpstr&gt;Slide 1&lt;/vt:lpstr&gt;
          &lt;/vt:vector&gt;
        &lt;/TitlesOfParts&gt;
        &lt;Company&gt;Mark Logic Corporation&lt;/Company&gt;
        &lt;LinksUpToDate&gt;false&lt;/LinksUpToDate&gt;
        &lt;SharedDoc&gt;false&lt;/SharedDoc&gt;
        &lt;HyperlinksChanged&gt;false&lt;/HyperlinksChanged&gt;
        &lt;AppVersion&gt;12.0000&lt;/AppVersion&gt;
      &lt;/Properties&gt;
    &lt;/pkg:xmlData&gt;
  &lt;/pkg:part&gt;
  &lt;pkg:part pkg:name="/docProps/core.xml" pkg:contentType="application/vnd.openxmlformats-package.core-properties+xml"&gt;
    &lt;pkg:xmlData&gt;
      &lt;cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" 
			    xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"             
                            xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;dc:title&gt;Slide 1&lt;/dc:title&gt;
        &lt;dc:creator&gt;paven&lt;/dc:creator&gt;
        &lt;cp:lastModifiedBy&gt;paven&lt;/cp:lastModifiedBy&gt;
        &lt;cp:revision&gt;1&lt;/cp:revision&gt;
        &lt;dcterms:created xsi:type="dcterms:W3CDTF"&gt;2009-09-01T19:36:41Z&lt;/dcterms:created&gt;
        &lt;dcterms:modified xsi:type="dcterms:W3CDTF"&gt;2009-09-01T19:37:25Z&lt;/dcterms:modified&gt;
      &lt;/cp:coreProperties&gt;
    &lt;/pkg:xmlData&gt;
  &lt;/pkg:part&gt;
  &lt;pkg:part pkg:name="/docProps/thumbnail.jpeg" pkg:contentType="image/jpeg" pkg:compression="store"&gt;
    &lt;pkg:binaryData&gt;
      /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
      AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB
      ...
      ... 
      ...
  &lt;/pkg:part&gt;
&lt;/pkg:package&gt;
				      </pre>
<font style="font-family: arial; font-size: 10pt;"><i>
Note: example above truncated for brevity.  All pieces of .pptx package are present and serialized within &lt;pkg:package&gt;, captured as &lt;pkg:part&gt; elements.<br/>
Images in this model are captured as base64 encoded strings, following the Open XML format.  This file may be opened as <br/>
a .XML file within PowerPoint.  Saving as XML in PowerPoint will generate this format for a .pptx package as well.<br/>
</font></i>
                                     </div>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td></td>
				   </tr>
	                          </tbody>
				 </table>


 <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">
				   <tbody>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12">
                                      <hr class="control-line" size="1">
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td>
                                      <table>
                                       <tbody>
                                        <tr>
					 <td colspan="2" style="font-size: 12pt; font-family: Courier;">
                                          <a id="ppt:package-map"></a><b><font color="#c00831">ppt:package-map</font></b>(
                                         </td>
				        </tr>
                                        <tr>
					 <td width="20"></td>
					 <td style="font-size: 11pt; font-family: Courier;">$directory as xs:string
                                         </td>
				        </tr>
                                        <tr>
					 <td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp;as&nbsp;map:map</td>
				        </tr>
                                       </tbody>
                                      </table>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12"></td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Summary:</b>
                                      <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
This function returns a map for the specified presentation. Map keys are equivalent to the manifest for the .pptx zip package.  Map values are URIs for the package parts located in MarkLogic.
                                      </div><br>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Parameters:</b>
                                      <table>
                                       <tbody>
                                        <tr class="mainbody">
					 <td style="font-size: 11pt; font-family: Arial;">
                                          <img src="images/varspace.gif" width="8">
                                          <div style="margin-left: 0.5in; margin-right: 8px;">
                                           <font style="font-size: 11pt; font-family: Courier;">$directory:
                                           </font>
                                           <font style="font-family: arial; font-size: 10pt;">
                The directory in MarkLogic that contains the files of extracted presentation to be used for map. 
                                           </font>
                                          </div> 
                                         </td>
				        </tr>
                                      </tbody>
                                     </table>
                                     <br>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td>
                                     <img src="images/varspace.gif" width="8">
                                     <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
                                     <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
                                      <pre xml:space="preserve">
xquery version "1.0-ml";
import module namespace ppt=  "http://marklogic.com/openxml/powerpoint" at "/MarkLogic/openxml/presentation-ml-support.xqy";

let $presentation-dir:="/foo_pptx_parts/" 
let $map := ppt:package-map($presentation-dir)
return map:keys($map)
=&gt;
ppt/slideLayouts/slideLayout10.xml
ppt/slideLayouts/slideLayout11.xml
ppt/slideLayouts/slideLayout3.xml
ppt/slideLayouts/slideLayout4.xml
ppt/slideLayouts/slideLayout8.xml
ppt/slideLayouts/_rels/slideLayout4.xml.rels
ppt/media/image1.png
ppt/slideLayouts/_rels/slideLayout1.xml.rels
ppt/presProps.xml
ppt/slideMasters/slideMaster1.xml
docProps/thumbnail.jpeg
ppt/slides/slide1.xml
ppt/slideLayouts/_rels/slideLayout8.xml.rels
ppt/slideLayouts/_rels/slideLayout5.xml.rels
ppt/slideLayouts/_rels/slideLayout11.xml.rels
ppt/slides/_rels/slide1.xml.rels
ppt/presentation.xml
ppt/tableStyles.xml
ppt/viewProps.xml
ppt/slideLayouts/slideLayout1.xml
docProps/app.xml
ppt/slideLayouts/slideLayout5.xml
ppt/slideLayouts/slideLayout9.xml
[Content_Types].xml
docProps/core.xml
ppt/slideLayouts/_rels/slideLayout2.xml.rels
ppt/slideLayouts/_rels/slideLayout9.xml.rels
ppt/slideLayouts/_rels/slideLayout6.xml.rels
ppt/slideLayouts/_rels/slideLayout3.xml.rels
ppt/slideLayouts/slideLayout2.xml
ppt/_rels/presentation.xml.rels
ppt/slideLayouts/slideLayout6.xml
ppt/theme/theme1.xml
ppt/slideLayouts/slideLayout7.xml
_rels/.rels
ppt/slideLayouts/_rels/slideLayout7.xml.rels
ppt/slideLayouts/_rels/slideLayout10.xml.rels
ppt/slideMasters/_rels/slideMaster1.xml.rels
                                      </pre>
                                     </div>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td></td>
				   </tr>
	                          </tbody>
				 </table>


 <table class="mainbody" width="100%" border="0" cellpadding="0" cellspacing="0">
				   <tbody>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12">
                                      <hr class="control-line" size="1">
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td>
                                      <table>
                                       <tbody>
                                        <tr>
					 <td colspan="2" style="font-size: 12pt; font-family: Courier;">
                                          <a id="ppt:package-map-zip"></a><b><font color="#c00831">ppt:package-map-zip</font></b>(
                                         </td>
				        </tr>
                                        <tr>
					 <td width="20"></td>
					 <td style="font-size: 11pt; font-family: Courier;">$map as map:map
                                         </td>
				        </tr>
                                        <tr>
					 <td colspan="2" style="font-size: 11pt; font-family: Courier;">)&nbsp;as&nbsp;binary()</td>
				        </tr>
                                       </tbody>
                                      </table>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td><img src="images/varspace.gif" height="12"></td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Summary:</b>
                                      <div style="margin-left: 0.5in; margin-right: 8px; font-family: arial; font-size: 10pt;"> <br>
            This function returns the zip archive for the documents specified in the map.  
                                      </div><br>
                                     </td>
				    </tr>
                                    <tr class="mainbody">
				     <td style="font-size: 10pt; font-family: Arial;">
                                      <img src="images/varspace.gif" width="8">
                                      <b>Parameters:</b>
                                      <table>
                                       <tbody>
                                        <tr class="mainbody">
					 <td style="font-size: 11pt; font-family: Arial;">
                                          <img src="images/varspace.gif" width="8">
                                          <div style="margin-left: 0.5in; margin-right: 8px;">
                                           <font style="font-size: 11pt; font-family: Courier;">$map:
                                           </font>
                                           <font style="font-family: arial; font-size: 10pt;">
		The map to create a zip archive from. The map keys will be used for as the manifest values. 
                <br/>The map values are either URIs for documents on the server, or the XML that should be used for the file specified by key.  
                                           </font>
                                          </div> 
                                         </td>
				        </tr>
                                      </tbody>
                                     </table>
                                     <br>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td>
                                     <img src="images/varspace.gif" width="8">
                                     <font style="font-size: 10pt; font-family: Arial;"><b>Example:</b></font>
                                     <div style="margin-left: 0.5in; margin-right: 8px; font-size: 9pt; font-family: Courier;"> 
                                      <pre xml:space="preserve">
xquery version "1.0-ml";
import module namespace ppt=  "http://marklogic.com/openxml/powerpoint" at "/MarkLogic/openxml/presentation-ml-support.xqy";


let $presentation-dir:="/foo_pptx_parts/" 
let $map := ppt:package-map($presentation-dir)
let $zip := ppt:package-map-zip($map)
return xdmp:save("C:\foo2.pptx",$zip)
=&gt;
foo2.pptx is saved on the filesystem.  this can be opened in PowerPoint.
       
                                      </pre>
                                     </div>
                                    </td>
				   </tr>
                                   <tr class="mainbody">
				    <td></td>
				   </tr>
	                          </tbody>
				 </table>
       <!--</td>
			  </tr>







	  </tbody></table>
      </td>
		    </tr>-
    </tbody></table>
    </td>
	      </tr>
  </tbody></table>
  </td>
	</tr>
</tbody></table>-->
      <table width="100%" align="left" border="0" cellpadding="0" cellspacing="0"><tbody><tr valign="middle" height="30">
	  <td class="copyright" style="padding-left: 10px;">
        © Copyright 2002-2010 Mark Logic Corporation.&nbsp;&nbsp;All rights reserved.
      </td>
	</tr></tbody></table>
    </form>
</body></html>
